<extend name="Base/list" />

<block name="title">管理员</block>

<block name="nav">
<li class="current"><a href="{:U(CONTROLLER_NAME.'/index')}">列表</a></li>
<li><a href="{:U(CONTROLLER_NAME.'/add')}">添加</a></li>
</block>

<block name="list">
<if condition="$All">
{$page}
<div id="list">
  <table>
    <tr><th class="name">用户名</th><th class="level">是否激活</th><th class="order_permit">订单权限</th><th class="qqau">QQ绑定</th><th class="date">加入时间</th><th class="control">操作</th></tr>
    <foreach name="All" key="key" item="value">
    <tr><td>{$value['name']|keyword=$keyword}</td><td><if condition="$value['level']==0"><span class="green">否</span> | <a href="{:U(CONTROLLER_NAME.'/activation',array('id'=>$value['id']))}">帮他激活</a><elseif condition="$value['level']==1"/>超级管理员<elseif condition="$value['level']==2"/><span class="red">是</span> | <a href="{:U(CONTROLLER_NAME.'/activation',array('id'=>$value['id']))}">取消激活</a></if></td><td><if condition="$value['level']==1">-<else/><if condition="$value['order_permit']==1"><span class="green">自己订单</span><elseif condition="$value['order_permit']==2"/><span class="blue">自己订单 + 前台订单</span><elseif condition="$value['order_permit']==3"/><span class="red">所有订单</span></if></if></td><td><if condition="$value['qqau']"><span class="red">是</span> | <a href="{:U(CONTROLLER_NAME.'/qq',array('id'=>$value['id']))}">解除绑定</a><else/><span class="green">否</span></if></td><td>{$value['date']|dateFormat}</td><td><a href="{:U(CONTROLLER_NAME.'/update',array('id'=>$value['id']))}">修改</a>/<a href="{:U(CONTROLLER_NAME.'/delete',array('id'=>$value['id']))}">删除</a></td></tr>
     </foreach>
  </table>
</div>
{$page}
<else/>
<p id="nothing">没有找到您搜索的管理员</p>
</if>
</block>